import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    token:'',
  },
  mutations: {
    // 登录时保存
    setToken(state,loginToken){
      state.token = loginToken
    },
    // 退出时清除
    clearToken(state){
      state.token = ''
    }
  },
  actions: {
  },
  modules: {
  }
})
